# _*_ coding: utf-8 _*_
from odoo import models, api, fields, _
from odoo.exceptions import Warning


class OLStockMoveExtend(models.Model):
    _inherit = ["stock.move", "stock.view.quant.mixin"]
    _name = "stock.move"

    @api.multi
    def action_view_quants_by_item(self):
        return self.action_view_quant_by_product_ids([self.product_id.id])

    @api.multi
    def action_view_quants(self):
        self.ensure_one()
        products = self.order_line.mapped("product_id")
        return self.action_view_quant_by_product_ids(products.ids)
